package com.etc.entity;

import java.io.Serializable;
import java.util.Date;

public class Article implements Serializable {
    private Integer aid;

    private User user;

    private String atitle;

    private Integer ascore=0;

    private Boolean astatus=false;

    private Integer apageview=0;

    private String aimage;

    private Articledetail articledetail;
    
    private String detail;
    
    private Date acreatetime;


    private static final long serialVersionUID = 1L;

    public Integer getAid() {
        return aid;
    }

    public void setAid(Integer aid) {
        this.aid = aid;
    }

    public String getAtitle() {
        return atitle;
    }

    public void setAtitle(String atitle) {
        this.atitle = atitle == null ? null : atitle.trim();
    }

    public Integer getAscore() {
        return ascore;
    }

    public void setAscore(Integer ascore) {
        this.ascore = ascore;
    }

    public Boolean getAstatus() {
        return astatus;
    }

    public void setAstatus(Boolean astatus) {
        this.astatus = astatus;
    }

    public Integer getApageview() {
        return apageview;
    }

    public void setApageview(Integer apageview) {
        this.apageview = apageview;
    }

    public String getAimage() {
        return aimage;
    }

    public void setAimage(String aimage) {
        this.aimage = aimage == null ? null : aimage.trim();
    }


    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Article other = (Article) that;
        return (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()))
            && (this.getAtitle() == null ? other.getAtitle() == null : this.getAtitle().equals(other.getAtitle()))
            && (this.getAscore() == null ? other.getAscore() == null : this.getAscore().equals(other.getAscore()))
            && (this.getAstatus() == null ? other.getAstatus() == null : this.getAstatus().equals(other.getAstatus()))
            && (this.getApageview() == null ? other.getApageview() == null : this.getApageview().equals(other.getApageview()))
            && (this.getAimage() == null ? other.getAimage() == null : this.getAimage().equals(other.getAimage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
        result = prime * result + ((getAtitle() == null) ? 0 : getAtitle().hashCode());
        result = prime * result + ((getAscore() == null) ? 0 : getAscore().hashCode());
        result = prime * result + ((getAstatus() == null) ? 0 : getAstatus().hashCode());
        result = prime * result + ((getApageview() == null) ? 0 : getApageview().hashCode());
        result = prime * result + ((getAimage() == null) ? 0 : getAimage().hashCode());
        return result;
    }

   


	@Override
	public String toString() {
		return "Article [aid=" + aid + ", user=" + user + ", atitle=" + atitle
				+ ", ascore=" + ascore + ", astatus=" + astatus
				+ ", apageview=" + apageview + ", aimage=" + aimage
				+ ", articledetail=" + articledetail + ", detail=" + detail
				+ "]";
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Articledetail getArticledetail() {
		return articledetail;
	}

	public void setArticledetail(Articledetail articledetail) {
		this.articledetail = articledetail;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public Date getAcreatetime() {
		return acreatetime;
	}

	public void setAcreatetime(Date acreatetime) {
		this.acreatetime = acreatetime;
	}
}